#ifndef _DXCamera_H
#define _DXCamera_H

#include <d3d9.h>
#include <d3dx9.h>

class DXCamera
{
private:
	
	D3DXVECTOR3 m_EyePos; //Position des yeux
	D3DXVECTOR3 m_TargetPos;
	D3DXVECTOR3 m_UpVector;
	D3DXVECTOR3	m_RightVector;   // Right Vector

	D3DXMATRIXA16 m_View;
	D3DXMATRIX m_Projection;
	D3DXMATRIX m_ViewProj;
	D3DXMATRIX m_ModelView;

	POINT  m_LastMousePosit;
	POINT  m_CurrentMousePosit;
	bool   m_Mousing;
	float  m_MoveSpeed;
	
public:
	DXCamera();
	~DXCamera() {}

	void SetUp(LPDIRECT3DDEVICE9 p_dx_Device);

	void updateViewMatrix(LPDIRECT3DDEVICE9 p_dx_Device);

	void getRealTimeUserInput(HWND g_hWnd, float g_fElpasedTime);

	bool getMousing(){return m_Mousing;}
	void setMousing(bool _value){m_Mousing = _value;}

	D3DXVECTOR3 getEyePos() { return m_EyePos; }
	
	D3DXVECTOR3 getTargetPos() { return m_TargetPos; }
	
	D3DXVECTOR3 getUpVector() { return m_UpVector; }
	
	D3DXMATRIXA16 getView() { return m_View; }
	
	D3DXMATRIX getProjection() { return m_Projection; }
	
	D3DXMATRIX getViewProj() { return m_ViewProj; }
	void setViewProj(D3DXMATRIX a_vp) { m_ViewProj = a_vp; }

	D3DXMATRIX getModelView() { return m_ModelView; }
	void setModelView(D3DXMATRIX a_mv) { m_ModelView = a_mv; }
};

#endif